<script setup>
import axios from 'axios'
const emit = defineEmits([
  'addMarkersChange',
  'deleteMarkersChange',
  'updateMarkersChange',
])
const addMarkers = () => {
  axios.get('/api/location').then((res) => {
    if (res.data.code === '200') {
      emit('addMarkersChange', res.data.data)
    }
  })
}
const deleteMarkers = () => {
  emit('deleteMarkersChange')
}
const updateMarkers = () => {
  emit('updateMarkersChange')
}
</script>
<template>
  <div>
    <el-button type="primary" @click="addMarkers">新增点位</el-button>
    <el-button type="danger" @click="deleteMarkers"
      >删除部分/全部点位</el-button
    >
  </div>
</template>

<style lang="scss" scoped></style>
